<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//----------------数组------------------------------------------
			const arr = [1, 2, 3];

			const [a, b, c, d] = arr;

			// console.log(a, b, c,d);
			
			//----------------对象------------------------------------------
			
			const stu = {
				name: '张三',
				age: 20
			}
			// console.log(stu.name);
			// console.log(stu.age);
			const {name,age} = stu;
			console.log(name);
			console.log(age);
		</script>
	</body>
</html>
